// 企业发布职位
import React, { Component } from 'react'
import {
    View,
    Text,
    TouchableOpacity,
} from 'react-native';
import { Companysize_Style as styles } from '../../../../styles';

export default class Companysize_body extends Component {
    constructor(props) {
        super(props);
        this.state = { color: 0 };
    };
    render() {
        return (
            <View style={styles.siz_all}>

                {/* 
                <TouchableOpacity style={styles.rsk} activeOpacity={1} onPress={() => { this.choose(1) }}>
                    {this.state.color == 1 ? <Text style={styles.rsk2}>
                        <Icon
                            name={'md-checkmark'}
                            size={15}
                            color={'#fff'} />
                    </Text> : <Text style={styles.rsk}></Text>}
                </TouchableOpacity> */}

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(1) }}>
                    {this.state.color == 1 ?
                        <Text style={styles.siz_text2}>1-49人</Text>
                        : <Text style={styles.siz_text}>1-49人</Text>}
                    {/* <Text style={styles.siz_text}>1-49人</Text> */}
                </TouchableOpacity>


                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(2) }}>
                    {this.state.color == 2 ?
                        <Text style={styles.siz_text2}>50-99人</Text>
                        : <Text style={styles.siz_text}>50-99人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(3) }}>
                    {this.state.color == 3 ?
                        <Text style={styles.siz_text2}>100-499人</Text>
                        : <Text style={styles.siz_text}>100-499人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(4) }}>
                    {this.state.color == 4 ?
                        <Text style={styles.siz_text2}>500-999人</Text>
                        : <Text style={styles.siz_text}>500-999人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(5) }}>
                    {this.state.color == 5 ?
                        <Text style={styles.siz_text2}>1000-1999人</Text>
                        : <Text style={styles.siz_text}>1000-1999人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(6) }}>
                    {this.state.color == 6 ?
                        <Text style={styles.siz_text2}>2000-4999人</Text>
                        : <Text style={styles.siz_text}>2000-4999人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(7) }}>
                    {this.state.color == 7 ?
                        <Text style={styles.siz_text2}>5000-10000人</Text>
                        : <Text style={styles.siz_text}>5000-10000人</Text>}
                </TouchableOpacity>

                <TouchableOpacity style={styles.siz_tou} activeOpacity={1} onPress={() => { this.choose(8) }}>
                    {this.state.color == 8 ?
                        <Text style={styles.siz_text2}>10000人以上</Text>
                        : <Text style={styles.siz_text}>10000人以上</Text>}
                </TouchableOpacity>
            </View>
        )
    }
    choose(a) {
        this.setState({color: a});
        let s = '';
        if (a == 1) {
            s = '1-49人';
        } else if (a == 2) {
            s = '50-99人';
        } else if (a == 3) {
            s = '100-499人';
        } else if (a == 4) {
            s = '500-999人';
        } else if (a == 5) {
            s = '1000-1999人';
        } else if (a == 6) {
            s = '2000-4999人';
        } else if (a == 7) {
            s = '5000-10000人';
        } else if (a == 8) {
            s = '10000人以上';
        }
        this.props.rollback(s);
    }
}